<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<link rel="stylesheet" href="/jquery-easyui-1.5.2/themes/bootstrap/easyui.css"></link>
<link rel="stylesheet" href="/css/wholeStyle.css"></link>
<!-- <link rel="stylesheet" href="/css/bootstrap.css"></link> -->
<script type="text/javascript" src="/jquery-easyui-1.5.2/jquery.min.js"></script>
<script type="text/javascript" src="/jquery-easyui-1.5.2/jquery.easyui.min.js"></script>
<script type="text/javascript" src="/jquery-easyui-1.5.2/locale/easyui-lang-zh_CN.js"></script>

<script type="text/javascript">
	$(function(){
// 		$.messager.alert("提示","萨芬");
	$("#modular1").accordion({
		animate:true,
		fit:true
	});
	$("#window-tabs").tabs({
		border:false,
		pill:true,
		fit:true,
		scrollDuration:2000,
		tabWidth:200
	});
	$(".nav-left").click(function(){
		var url=$(this).data("url");//打开的tab的 url
		if(url==null)
			return;
		var title=$(this).text();//打开的tab的 title
		var statusArray=['(浏览中...)','(新增中...)','(修改中...)'];
		var newTitle=null;
		for(var i=0 ; i< statusArray.length; i++){
			var tab=$("#window-tabs").tabs("getTab",title+statusArray[i]);//采购请购单(浏览中...)
			//如果通过title找到了tab 则选中到 那个tab
			if(tab!=undefined){
				$("#window-tabs").tabs("select",title+statusArray[i]);
				newTitle=title+statusArray[i];
				return;
			}
		}
		if(newTitle!=null)
			return;
		$("#window-tabs").tabs("add",{
			title:$(this).text()+"(浏览中...)",    
			content:"<iframe width='100%' height='98%' scrolling='no' frameborder='0' src='"+url+"'></iframe>",
		    closable:true,    
//	 	    collapsible:true,折叠
		    tools:[{    
		        iconCls:'icon-my-refresh',    
		        handler:function(){    
		            alert('refresh');    
		        }    
		    }]    
		});
	});
// alert($("#window-tabs").tabs("getSelected"));

	});
</script>
</head>
<body class="easyui-layout">   
    <div data-options="region:'north',title:'North Title',split:true,border:false" style="height:100px;"></div>   
    <div data-options="region:'south',title:'South Title',split:true" style="height:100px;"></div>   
<!--     <div data-options="region:'east',iconCls:'icon-reload',title:'East',split:true" style="width:100px;"></div>    -->
    <div data-options="region:'west',title:'West',split:true" style="width:200px;">
    	<div id="modular1" >
    		<div title="采购管理">
    			<div class="nav-left" data-url="purcharse/test.html">采购请购单</div>
    			<div class="nav-left" data-url="purcharse/purchaseInquiry.html">采购询价单</div>
    			<div class="nav-left" data-url="purcharse/purchaseOrder.html">采购订单</div>
    			<div class="nav-left" >采购入库单</div>
    			<div class="nav-left" >采购退货单</div>
    		</div>
    		<div title="销售管理">
    			<div class="nav-left" data-url="sale/SaleOrder.html">销售订单</div>
    		</div>
    		<div title="账款管理">
    			<div class="nav-left" data-url="finance/Prepay.html">预付款单</div>
    			<div class="nav-left" data-url="finance/Payment.html">付款冲款单</div>
    			<div class="nav-left" data-url="">预收款单</div>
    		</div>
    		<div title="库存管理">
    			<div class="nav-left" data-url="sale/Tiaobo.html">调拨单</div>
    		</div>
    	</div>
    </div>   
    <div data-options="region:'center'" style="padding:0px;background:#eee;">
    	<div id="window-tabs">
    		<div title="我的桌面">
    			<img alt="" src="/images/bgi/btn1.gif">
    		</div>
    	</div>
    </div>   
    
</body>  


</html>